﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;

public partial class Module_tinDoc : PanelControl
{
    CountryBusiness cb = new CountryBusiness();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    public string getRandomCountry()
    {
        string tmp = "";
        DataTable dt = cb.getRandomCountry();
        if (dt!=null)
        {
            DataRow dr;
            tmp += "<tr>";
            for (int i = 0; i < dt.Rows.Count;i++ )
            {
                dr = dt.Rows[i];
                tmp += "<td id=tdDD1><a href='Default.aspx?url=Module/CountryDetail.ascx&countryID=" + dr["countryID"].ToString() + "'>" + "<img src='/eprojectAirlinesReservationSystem/ImageView.aspx?countryID=" + dr["countryID"].ToString() + "' width=\"112px\" height=\"96px\"/>" + "</a>"+"</td>";
            }
            tmp += "</tr>";
            tmp += "<tr>";
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                dr = dt.Rows[i];
                tmp += "<td id=tdDD valign=top><a href='Default.aspx?url=Module/CountryDetail.ascx&countryID=" + dr["countryID"].ToString() + "'>" + dr["countryName"].ToString() + "</a><br/>" + dr["countryInfo"].ToString() + "</td>";
            }
                tmp += "</tr>";
        }
        return tmp;
    }
}